Skip to content

fix: handle empty tool_use content in AgentSpeaker gracefully#278

Merged
philipph-askui merged 1 commit into
mainfrom
fix/handle_emtpy_tool_use_content
Jun 1, 2026
Merged

fix: handle empty tool_use content in AgentSpeaker gracefully#278
philipph-askui merged 1 commit into
mainfrom
fix/handle_emtpy_tool_use_content

Conversation

@philipph-askui

Copy link
Copy Markdown
Contributor

The conversation decides "continue" vs "done" based solely on whether tool_use blocks exist in the content. So when the model returns stop_reason="tool_use" but sends empty content (which should not happen but does happen occasionally), the conversation silently ends as if it completed successfully, even though it is not completed.

@philipph-askui philipph-askui marked this pull request as ready for review May 27, 2026 13:35
@philipph-askui philipph-askui merged commit f4f79c0 into main Jun 1, 2026
1 check passed
@philipph-askui philipph-askui deleted the fix/handle_emtpy_tool_use_content branch June 1, 2026 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants